<HTML><HEAD><TITLE>weight(?Set, ++ElementWeights, ?Weight)</TITLE>
</HEAD><BODY>[ <A HREF="index.html">library(ic_hybrid_sets)</A> | <A HREF="../../index.html">Reference Manual</A> | <A HREF="../../fullindex.html">Alphabetic Index</A> ]
<H1>weight(?Set, ++ElementWeights, ?Weight)</H1>
According to the array of element weights, the weight of set Set is Weight
<DL>
<DT><EM>Set</EM></DT>
<DD>a set, set variable or set expression
</DD>
<DT><EM>ElementWeights</EM></DT>
<DD>an array (structure) of non-negative integers
</DD>
<DT><EM>Weight</EM></DT>
<DD>an integer variable or integer
</DD>
</DL>
<H2>Description</H2>
<P>
    Set is constrained to be a set of integers between 1 and the size of
    the array ElementWeights. Weight is an integer domain variable which
    is constrained to the sum of the weights of Set's elements. The weight
    of a set element is determined by the array element in ElementWeights
    whose index corresponds to the set element.
</P><P>
    Changes to the set domain will affect the domain of Weight. There is currently
    no reverse propagation. This may change in a future release.
</P>

</BODY></HTML>
